Multicore electronic device and packet processing method thereof

ABSTRACT

A multicore electronic device is provided. The multicore electronic device includes a multicore including a plurality of cores, each core being configured to process packets in a driver core layer, a network processing core layer, and an application core layer, and a memory configured to store executions instructions for causing a first core of the plurality of cores to, when the packets are received, identify a location of a driver core for delivering the packets to an operating system domain, a location of an application core for processing the packets in a user domain, and a processing amount, determine a location of a network processing core for processing the packets based on at least one of the location of the driver core, the location of the application core, and the processing amount of the session, and control the network processing core to perform network stack processing on the packets.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application is based on and claims priority under 35 U.S.C. §119(a) of a Korean patent application number 10-2019-0032915, filed onMar. 22, 2019, in the Korean Intellectual Property Office, thedisclosure of which is incorporated by reference herein in its entirety.

BACKGROUND 1. Field

The disclosure relates to a multicore electronic device and packetprocessing method thereof.

2. Description of Related Art

5G is the 5^(th) generation technology standard for low latency and highthroughput communication. A communication system for providing 5Gnetwork services uses highly sophisticated hardware and softwaretechnologies to achieve a high data rate.

For example, in order for an electronic device to support 5G networkservices, it is necessary to use multiple processors (e.g., multicoreprocessor) in view of hardware and a technology for processing receivedpackets in parallel simultaneously on multiple cores in view ofsoftware. The importance of the software-based multicore packetdistribution processing technology consists in distributing receivedpackets to the cores efficiently. Examples of such a packet distributionprocessing technology may include receive packet steering (RPS) andreceive flow steering (RFS) introduced in the Linux operating system(OS).

RPS is a technique for allowing network stack (e.g. Transmission ControlProtocol/Internet Protocol (TCP/IP) layer) processing to be done onpackets by assigning cores randomly according to a session of thepacket. RFS is a technique for determining a core for network stackprocessing on a received packet by matching an application core for areceiving session to the core for network stack processing.

Meanwhile, it may be possible for an electronic device to adopt a newApplication Programming Interface (API) (NAPI) technique for notifying apacket arrival status to a kernel when a packet arrives at a networkinterface. The NAPI is a technique for processing data efficiently insuch a way of batching, when a predetermined number of packets arereceived, and delivering the batch of packets to the upper layer.

The above information is presented as background information only toassist with an understanding of the disclosure. No determination hasbeen made, and no assertion is made, as to whether any of the abovemight be applicable as prior art with regard to the disclosure.

SUMMARY

The receive packet steering (RPS) technique, which randomly selects acore for processing packets without consideration of the status ofapplications and cores, may cause delay or failure to optimizethroughput of a multicore processor. For example, if the capabilities ofa driver task processing core and a network stack processing core do notsatisfy the demands of an application, it is difficult to performbatching in a new Application Programming Interface (API) (NAPI) andtransmission control protocol (TCP) processing procedure, which leads tolow throughput and inefficient operation. In the case of the receiveflow steering (RFS) technique, even when packets are processed by anetwork core located at the same location as the application core, ifthe packets arrive in a single session or are concentrated in a specificsession, a load (or overhead) is applied to the corresponding core,resulting in failure to achieve full use of multicore performance.

Aspects of the disclosure are to address at least the above-mentionedproblems and/or disadvantages and to provide at least the advantagesdescribed below. Accordingly, an aspect of the disclosure is to providea multicore electronic device for batching packets and processing thebatched packets in a distributed manner, and a core determination methodand apparatus thereof that are capable of reducing unnecessary overheadsand guaranteeing a higher performance by maximize a batch size ofpackets in consideration of the performances and interoperations ofdriver cores, network cores, and application cores.

Additional aspects will be set forth in part in the description whichfollows and, in part, will be apparent from the description, or may belearned by practice of the presented embodiments.

In accordance with an aspect of the disclosure, a multicore electronicdevice is provided. The multicore electronic device includes acommunication circuit, a multicore including a plurality of cores, eachcore being configured to process packets in a driver core layer, anetwork processing core layer, and an application core layer, and amemory configured to store instructions for a first core of theplurality of cores to, when the packets are received by thecommunication circuit, identify a location of a driver core fordelivering the packets to an operating system domain, a location of anapplication core for processing the packets in a user domain, and aprocessing amount of a session corresponding to the packets, determine alocation of a network processing core for processing the packets basedon at least one of the location of the driver core, the location of theapplication core, and the processing amount of the session, and controlthe network processing core to perform network stack processing on thepackets delivered to the operating system domain.

In accordance with another aspect of the disclosure, an electronicdevice is provided. The electronic device includes a communicationcircuit, a multicore comprising a plurality of cores, each core beingconfigured to process packets in a driver core layer, a networkprocessing core layer, and an application core layer, a memory, and aprocessor configured to when the packets are received by thecommunication circuit, control to identify a location of a driver corefor delivering, the packets, from one of multiple cores, to an operatingsystem domain, a location of an application core for processing thepackets in a user determine a location of a network processing core forprocessing the packets among the plurality of cores based on at leastone of the location of the driver core, the location of the applicationcore, and the processing amount of the session, and control to performnetwork stack processing on the packets using the network processingcore.

According to various disclosed embodiments may determine a location ofan application core for processing packets and select a networkprocessing core for TCP/IP stack processing based on the locations of adriver core and the application core for processing received packets anda packet processing amount per session. The proposed method isadvantageous in terms of improving a batch processing performance andefficiency of a multicore electronic device by using a core showing acapability equal to or greater in a lower layer than that in a higherlayer.

Other aspects, advantages, and salient features of the disclosure willbecome apparent to those skilled in the art from the following detaileddescription, which, taken in conjunction with the annexed drawings,discloses various embodiments of the disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects, features and advantages of certainembodiments of the disclosure will be more apparent from the followingdescription, taken in conjunction with the accompanying drawings, inwhich:

FIG. 1 is a block diagram illustrating an electronic device in a networkenvironment according to an embodiment of the disclosure;

FIG. 2 is a block diagram illustrating a configuration of a multicoreelectronic device according to an embodiment of the disclosure;

FIGS. 3A and 3B are diagrams of a network packet processing operationaccording to various embodiments of the disclosure;

FIG. 4 is a diagram of network packet processing hosts according to anembodiment of the disclosure;

FIG. 5 is a diagram illustrating a packet processing operation of anelectronic device according to an embodiment of the disclosure;

FIG. 6 is a diagram illustrating a packet processing operation of anelectronic device according to an embodiment of the disclosure;

FIG. 7 is a flowchart illustrating a method to determine a core forprocessing packets according to an embodiment of the disclosure;

FIG. 8 is a flowchart illustrating a method to determine a core forprocessing packets according to an embodiment of the disclosure;

FIG. 9 is a flowchart illustrating a method to determine a core forprocessing packets according to an embodiment of the disclosure;

FIG. 10 is a flowchart illustrating a method to determine a core forprocessing packets according to an embodiment of the disclosure;

FIG. 11 is a flowchart illustrating a method to determine a core forprocessing packets according to an embodiment of the disclosure;

FIG. 12 is a flowchart illustrating a method to determine a core forprocessing packets according to an embodiment of the disclosure; and

FIGS. 13A, 13B, and 13C are graphs for illustrating effects according tovarious embodiments of the disclosure.

Throughout the drawings, it should be noted that like reference numbersare used to depict the same or similar elements, features, andstructures.

DETAILED DESCRIPTION

The following description with reference to the accompanying drawings isprovided to assist in a comprehensive understanding of variousembodiments of the disclosure as defined by the claims and theirequivalents. It includes various specific details to assist in thatunderstanding but these are to be regarded as merely exemplary.Accordingly, those of ordinary skill in the art will recognize thatvarious changes and modifications of the various embodiments describedherein can be made without departing from the scope and spirit of thedisclosure. In addition, descriptions of well-known functions andconstructions may be omitted for clarity and conciseness.

The terms and words used in the following description and claims are notlimited to the bibliographical meanings, but, are merely used by theinventor to enable a clear and consistent understanding of thedisclosure. Accordingly, it should be apparent to those skilled in theart that the following description of various embodiments of thedisclosure is provided for illustration purpose only and not for thepurpose of limiting the disclosure as defined by the appended claims andtheir equivalents.

It is to be understood that the singular forms “a,” “an,” and “the”include plural referents unless the context clearly dictates otherwise.Thus, for example, reference to “a component surface” includes referenceto one or more of such surfaces.

FIG. 1 is a block diagram illustrating an electronic device 101 in anetwork environment 100 according to an embodiment of the disclosure.

Referring to FIG. 1, the electronic device 101 in the networkenvironment 100 may communicate with an electronic device 102 via afirst network 198 (e.g., a short-range wireless communication network),or an electronic device 104 or a server 108 via a second network 199(e.g., a long-range wireless communication network). According to anembodiment, the electronic device 101 may communicate with theelectronic device 104 via the server 108. According to an embodiment,the electronic device 101 may include a processor 120, memory 130, aninput device 150, a sound output device 155, a display device 160, anaudio module 170, a sensor module 176, an interface 177, a haptic module179, a camera module 180, a power management module 188, a battery 189,a communication module 190, a subscriber identification module (SIM)196, or an antenna module 197. In some embodiments, at least one (e.g.,the display device 160 or the camera module 180) of the components maybe omitted from the electronic device 101, or one or more othercomponents may be added in the electronic device 101. In someembodiments, some of the components may be implemented as singleintegrated circuitry. For example, the sensor module 176 (e.g., afingerprint sensor, an iris sensor, or an illuminance sensor) may beimplemented as embedded in the display device 160 (e.g., a display).

The processor 120 may execute, for example, software (e.g., a program140) to control at least one other component (e.g., a hardware orsoftware component) of the electronic device 101 coupled with theprocessor 120, and may perform various data processing or computation.According to one embodiment, as at least part of the data processing orcomputation, the processor 120 may load a command or data received fromanother component (e.g., the sensor module 176 or the communicationmodule 190) in volatile memory 132, process the command or the datastored in the volatile memory 132, and store resulting data innon-volatile memory 134. According to an embodiment, the processor 120may include a main processor 121 (e.g., a central processing unit (CPU)or an application processor (AP)), and an auxiliary processor 123 (e.g.,a graphics processing unit (GPU), an image signal processor (ISP), asensor hub processor, or a communication processor (CP)) that isoperable independently from, or in conjunction with, the main processor121. Additionally or alternatively, the auxiliary processor 123 may beadapted to consume less power than the main processor 121, or to bespecific to a specified function. The auxiliary processor 123 may beimplemented as separate from, or as part of the main processor 121.

The auxiliary processor 123 may control at least some of functions orstates related to at least one component (e.g., the display device 160,the sensor module 176, or the communication module 190) among thecomponents of the electronic device 101, instead of the main processor121 while the main processor 121 is in an inactive (e.g., sleep) state,or together with the main processor 121 while the main processor 121 isin an active state (e.g., executing an application). According to anembodiment, the auxiliary processor 123 (e.g., an image signal processoror a communication processor) may be implemented as part of anothercomponent (e.g., the camera module 180 or the communication module 190)functionally related to the auxiliary processor 123.

The memory 130 may store various data used by at least one component(e.g., the processor 120 or the sensor module 176) of the electronicdevice 101. The various data may include, for example, software (e.g.,the program 140) and input data or output data for a command relatedthererto. The memory 130 may include the volatile memory 132 or thenon-volatile memory 134.

The program 140 may be stored in the memory 130 as software, and mayinclude, for example, an operating system (OS) 142, middleware 144, oran application 146.

The input device 150 may receive a command or data to be used by othercomponent (e.g., the processor 120) of the electronic device 101, fromthe outside (e.g., a user) of the electronic device 101. The inputdevice 150 may include, for example, a microphone, a mouse, a keyboard,or a digital pen (e.g., a stylus pen).

The sound output device 155 may output sound signals to the outside ofthe electronic device 101. The sound output device 155 may include, forexample, a speaker or a receiver. The speaker may be used for generalpurposes, such as playing multimedia or playing record, and the receivermay be used for an incoming calls. According to an embodiment, thereceiver may be implemented as separate from, or as part of the speaker.

The display device 160 may visually provide information to the outside(e.g., a user) of the electronic device 101. The display device 160 mayinclude, for example, a display, a hologram device, or a projector andcontrol circuitry to control a corresponding one of the display,hologram device, and projector. According to an embodiment, the displaydevice 160 may include touch circuitry adapted to detect a touch, orsensor circuitry (e.g., a pressure sensor) adapted to measure theintensity of force incurred by the touch.

The audio module 170 may convert a sound into an electrical signal andvice versa. According to an embodiment, the audio module 170 may obtainthe sound via the input device 150, or output the sound via the soundoutput device 155 or a headphone of an external electronic device (e.g.,an electronic device 102) directly (e.g., wiredly) or wirelessly coupledwith the electronic device 101.

The sensor module 176 may detect an operational state (e.g., power ortemperature) of the electronic device 101 or an environmental state(e.g., a state of a user) external to the electronic device 101, andthen generate an electrical signal or data value corresponding to thedetected state. According to an embodiment, the sensor module 176 mayinclude, for example, a gesture sensor, a gyro sensor, an atmosphericpressure sensor, a magnetic sensor, an acceleration sensor, a gripsensor, a proximity sensor, a color sensor, an infrared (IR) sensor, abiometric sensor, a temperature sensor, a humidity sensor, or anilluminance sensor.

The interface 177 may support one or more specified protocols to be usedfor the electronic device 101 to be coupled with the external electronicdevice (e.g., the electronic device 102) directly (e.g., wiredly) orwirelessly. According to an embodiment, the interface 177 may include,for example, a high definition multimedia interface (HDMI), a universalserial bus (USB) interface, a secure digital (SD) card interface, or anaudio interface.

A connection terminal 178 may include a connector via which theelectronic device 101 may be physically connected with the externalelectronic device (e.g., the electronic device 102). According to anembodiment, the connection terminal 178 may include, for example, a HDMIconnector, a USB connector, a SD card connector, or an audio connector(e.g., a headphone connector).

The haptic module 179 may convert an electrical signal into a mechanicalstimulus (e.g., a vibration or a movement) or electrical stimulus whichmay be recognized by a user via his tactile sensation or kinestheticsensation. According to an embodiment, the haptic module 179 mayinclude, for example, a motor, a piezoelectric element, or an electricstimulator.

The camera module 180 may capture a still image or moving images.According to an embodiment, the camera module 180 may include one ormore lenses, image sensors, image signal processors, or flashes.

The power management module 188 may manage power supplied to theelectronic device 101. According to one embodiment, the power managementmodule 188 may be implemented as at least part of, for example, a powermanagement integrated circuit (PMIC).

The battery 189 may supply power to at least one component of theelectronic device 101. According to an embodiment, the battery 189 mayinclude, for example, a primary cell which is not rechargeable, asecondary cell which is rechargeable, or a fuel cell.

The communication module 190 may support establishing a direct (e.g.,wired) communication channel or a wireless communication channel betweenthe electronic device 101 and the external electronic device (e.g., theelectronic device 102, the electronic device 104, or the server 108) andperforming communication via the established communication channel. Thecommunication module 190 may include one or more communicationprocessors that are operable independently from the processor 120 (e.g.,the application processor (AP)) and supports a direct (e.g., wired)communication or a wireless communication. According to an embodiment,the communication module 190 may include a wireless communication module192 (e.g., a cellular communication module, a short-range wirelesscommunication module, or a global navigation satellite system (GNSS)communication module) or a wired communication module 194 (e.g., a localarea network (LAN) communication module or a power line communication(PLC) module). A corresponding one of these communication modules maycommunicate with the external electronic device via the first network198 (e.g., a short-range communication network, such as Bluetooth™,wireless-fidelity (Wi-Fi) direct, or infrared data association (IrDA))or the second network 199 (e.g., a long-range communication network,such as a cellular network, the Internet, or a computer network (e.g.,LAN or wide area network (WAN)). These various types of communicationmodules may be implemented as a single component (e.g., a single chip),or may be implemented as multi components (e.g., multi chips) separatefrom each other. The wireless communication module 192 may identify andauthenticate the electronic device 101 in a communication network, suchas the first network 198 or the second network 199, using subscriberinformation (e.g., international mobile subscriber identity (IMSI))stored in the SIM 196.

The antenna module 197 may transmit or receive a signal or power to orfrom the outside (e.g., the external electronic device) of theelectronic device 101. According to an embodiment, the antenna module197 may include an antenna including a radiating element composed of aconductive material or a conductive pattern formed in or on a substrate(e.g., printed circuit board (PCB)). According to an embodiment, theantenna module 197 may include a plurality of antennas. In such a case,at least one antenna appropriate for a communication scheme used in thecommunication network, such as the first network 198 or the secondnetwork 199, may be selected, for example, by the communication module190 (e.g., the wireless communication module 192) from the plurality ofantennas. The signal or the power may then be transmitted or receivedbetween the communication module 190 and the external electronic devicevia the selected at least one antenna. According to an embodiment,another component (e.g., a radio frequency integrated circuit (RFIC))other than the radiating element may be additionally formed as part ofthe antenna module 197.

At least some of the above-described components may be coupled mutuallyand communicate signals (e.g., commands or data) therebetween via aninter-peripheral communication scheme (e.g., a bus, general purposeinput and output (GPIO), serial peripheral interface (SPI), or mobileindustry processor interface (MIPI)).

According to various embodiments, the processor 120 of the electronicdevice 101 may include N cores. The N cores may include a highperformance core (e.g., big core) consuming more power and having moreprocessing capability and a low performance core (e.g., little core)consuming less power and having less processing capability.

According to various embodiments, in the network environment 100, theelectronic device 101 may receive packets from the network and processthe received packets using multiple cores in a distributed manner. Forexample, the cores may be hierarchically organized to process packets ontheir own layers: a driver core for delivering the received packets toan upper layer, a network processing core for network stack processing,and an application core for application processing in a user domain.

A description is made of the multicore electronic device 101 and amethod for determining a location of a network processing core fornetwork stack processing in consideration of a location of a driver coreand a location of an application core in the electronic device 101.

FIG. 2 is a block diagram illustrating a configuration of a multicoreelectronic device according to an embodiment of the disclosure.

Referring to FIG. 2, the multicore electronic device 201 (e.g.,electronic device 101 in FIG. 1) may include a multicore 210 (e.g.,processor 120 in FIG. 1), a network driver 220, a core managementcontroller 230, and a memory 240 (e.g., memory 130 in FIG. 1).

According to an embodiment, the multicore 210 may be a processorincluding at least N cores 211, 212, 213, and 214. The description isdirected to, but is not limited to, the case where the multicore 210includes first type cores (e.g., high performance core, high power core,and big core) and second type cores (e.g., low performance core, lowpower core, and little core). The quantity of the first type cores andthe second type cores may be determined depending on the specification(spec) of the electronic device.

According to an embodiment, the N cores included in the multicore 210may be referred to with a core number (e.g., core 0, core 1, core 2,core 4, and core N). The cores included in the multicore 210 may becategorized into one of a first cluster and a second cluster accordingto their performance. The electronic device 201 may categorize coresinto one of the clusters according to the core numbers. For example,presuming 8 cores, cores 4 to 7 fall into the first cluster while cores0 to 3 fall into the second cluster. The electronic device 201 mayidentify whether a core belongs to the first cluster or the secondcluster based on the core number.

According to an embodiment, the network driver 220 may include a networkinterface card (NIC) (not shown). The network driver 220 may beimplemented as a software component for network communication withanother device. According to an embodiment, the network driver 220 maybe connected to a modem (e.g., local area network (LAN) card) of acommunication processor via a peripheral component interconnect (PCI)express interface. According to various embodiments, the NIC mayinclude, but is not limited to, a LAN card. The electronic device 201may connect to a network via a wireless or wired connection. Theelectronic device 101 may connect to a network using a media accesscontrol (MAC) address of the MC or modem.

According to an embodiment, the network driver 220 (e.g., NIC) mayinclude a receive (Rx) buffer (not shown) for queuing received packetsand a transmit (Tx) buffer (not shown) for queuing packets processed byan application in the user domain for transmission.

According to an embodiment, the network driver 220 may receive packetsthrough network communication with another electronic device. Accordingto an embodiment, the network driver 220 may be mounted in a kernel andreceive an interrupt signal for an incoming packet from the NIC (orcommunication processor including a modem). The kernel may include an OS(e.g., OS 142 in FIG. 1). For example, it may be possible to receive aplurality of packets, and a plurality of packets may be delivered todifferent layer cores.

According to an embodiment, the core management controller 230 may bedriven by at least one core of the multiple cores of the multicore 210or as a part of the processor 120 in FIG. 1.

According to an embodiment, the core management controller may be ahardware component configured to operate independently from themulticore 210.

According to another embodiment, the core management controller 230 maybe a software program (e.g., program 140 in FIG. 1). For example, thecore management controller 230 as a software component may be stored inthe form of commands (or instructions) in the memory 240 executable bythe processor 120.

According to an embodiment, the core management controller 230 maydetect execution of an application, assign one of the multiple cores tothe application, and control the multicore 210.

According to an embodiment, the core management controller 230 maymonitor the information on a session of the packets being communicatedvia the network to determine a location (i.e., identity) of a core forprocessing the packets. For example, the location of the core mayinclude the core number or cluster type information. According to anembodiment, the core management controller 230 may acquire at least oneof a session ID of packets, an identifier (e.g., a number) of the drivercore that delivered the packet to a concurrent processing engine, anidentifier of an application (e.g., application for processing thepacket) core related to the session ID, and/or processing informationper session. For example, the concurrent processing engine may be asoftware component running on the OS (e.g., OS 142 in FIG. 1) andunderstood as an engine for identifying the packets received from thenetwork with session IDs and processing the packets on the cores in adistributed manner.

According to an embodiment, the core management controller 230 maydetermine an identifier (e.g., a number) of the network processing corefor network stack (e.g., TCP/IP stack) processing on the packets basedon the information received from the concurrent processing engine.

According to an embodiment, the core management controller 230 maydetermine a cluster type of the network processing core for networkstack (e.g., TCP/IP stack) processing on the packets based on theinformation received from the concurrent processing engine.

According to an embodiment, the core management controller 230 maymonitor the location of the application core for processing data in theuser domain to detect a change of the location of the application coreand change the location of the network processing core based on thechange of the location of the application core.

According to an embodiment, the core management controller 230 maymonitor an operation status of the application to determine a locationof the application core and, if necessary, control to change thelocation of the application core. For example, the location of theapplication core may include information indicating a core number or acluster type. For example, if it is necessary to change from the highperformance core to the low performance core in the application layer,the core management controller 230 may select one of the cores in thelow power cluster and designate the selected low power core as theapplication core.

According to an embodiment, the core management controller 230 may checkthe operation times of the cores processing applications and the numberof packets being processed by the cores based on the session ID and, ifthe operation time of a certain core is greater than a threshold value,determine a location of the application core based on the core clusterto which the core processing the application belongs. For example, ifthe application core for processing packets related to an audio playbackapplication belongs to the high performance cluster, the location of theapplication core corresponding to the audio playback application may bedetermined as a high performance core.

According to an embodiment, the core management controller 230 maydetermine the location of the application core based on whether theapplication is running in the foreground or the background.

According to an embodiment, the core management controller 230 maypredesignate a core location for a specific application or designate thelocation of the application core through machine learning.

According to an embodiment, the core management controller 230 may checka packet processing level (e.g., low, medium, and high) to determine anetwork processing core of the related session.

According to an embodiment, the core management controller 230 maychange the threshold value based on at least one of the location of theapplication core, the location of the driver core for delivering packetsto the concurrent processing engine, and characteristic information ofthe application, and determine a network processing core by comparingthe threshold level to the threshold value. The packet processing amountof the application may be the amount of packet data being processed in aunit of time and expressed by units of bytes per second (BPS), bits persecond (bPS), or packets per second (PPS).

According to an embodiment, the core management controller 230 maychange the threshold value for the packet processing amount of theapplication according to the location of the main core executing theapplication.

According to an embodiment, the core management controller 230 maychange the threshold value for the packet processing amount of theapplication according to whether the application is running in theforeground or the background.

According to an embodiment, the core management controller 230 maychange the threshold value for the packet processing amount of theapplication according to the location of the application core based onpredetermined information or learned information.

According to an embodiment, the memory 240 may include at least one ofdynamic random access memory (DRAM), static random access memory (SRAM),synchronized dynamic random access memory (SDRAM), double data rate 2(DDR2) RAM, Rambus dynamic random access memory (RDRAM), or other typesof memories.

According to an embodiment, the memory 240 may temporarily storesoftware (e.g., a program (program 140 in FIG. 1) and a concurrentprocessing engine) and input and output data of instructions associatedwith the software.

According to an embodiment, the programs may include an OS forcontrolling resources of the electronic device 201, middleware, andapplications. The OS may control management (e.g. allocation anddeallocation) of one or more system resources (e.g., process, memory,and power). The middleware may provide various functions in order forthe application to use functions and information provided in associationwith the one or more system resources of the electronic device 201.

FIGS. 3A and 3B are diagrams of a network packet processing operationaccording to various embodiments of the disclosure, and FIG. 4 is adiagram of network packet processing hosts according to an embodiment ofthe disclosure. The electronic devices depicted in FIGS. 3A and 3B mayshow configurations of a device for receiving packets and processing thereceived packets.

Referring to FIG. 4, the electronic device (e.g., electronic device 201in FIG. 2) includes a multicore 410 (e.g., multicore 210 in FIG. 2) andmay receive packets via a network driver 320 (e.g., network driver 220in FIG. 2) and process the received packets in a hardware domain, an OSdomain, and a user domain.

Referring to FIG. 3A, the electronic device may include an NIC 315 thatis arranged in the hardware domain, a network driver 320, a concurrentprocessing engine 340, a core management controller 330 (e.g., coremanagement controller 230 in FIG. 2), and a TCP/IP stack 350 that arearranged in an OS domain, and an application 360 arranged in the userdomain. Here, the terms “OS domain” and “kernel domain” are used withthe same or a similar meaning.

Referring to FIG. 3B, the electronic device may include an MC 315 and acurrent processing engine A 341 that are arranged in the hardwaredomain, a network driver 320, a concurrent processing engine 340, a coremanagement controller 330, and a TCP/IP stack 350 that are arranged inthe OS region, and an application 360 that is arranged in the userdomain.

Referring to FIG. 3B, a concurrent processing engine may be implementedas a hardware component using a plurality of memories. In the embodimentof FIG. 3B, the concurrent processing engine A 341 queues the packetsreceived by the NIC 315 to internal memory buffers (e.g., queues) andactivates memory buffer-specific cores (i.e., first core, second core,and so on). The activated cores may control the operation of the networkdriver and operate the concurrent processing engine 340. In theembodiment of FIG. 3B, it may be understood that there are multiplecores operating the network driver 320. In the following description,the NIC 315, the network driver 320, the concurrent processing engine340, the core management controller 330, and the TCP/IP stack 350 arepresumed to operate in the same manner as described with reference toFIG. 3A. The electronic device may process the received packets in theOS domain (e.g., de-encapsulation) and provide the user with a serviceas a result of processing the packets in the OS domain. The packetsreceived via the network driver may be processed by the NIC, the networkdriver 320, the TCP/IP stack 350, and the application 360 in order. Thereceived packets may be processed by the core identified with adifferent number in each layer.

According to an embodiment, the packets received via the network drivermay be processed by the driver core A, the network processing core B,and the application core C in order as shown in FIG. 4. However, thecores are disclosed as software for convenience of explanation, they maybe implemented as hardware components (e.g., core 1, core 2, core 3, . .. ) operating in the respective layers. The hosts and operations of thecores for processing packets in respective layers are described later.

According to an embodiment, the network driver 320 may receive networkpackets via the MC. The network driver 320 may deliver the receivedpackets to the concurrent processing engine 340.

According to an embodiment, the network driver 320 may immediatelydeliver the received packet to the concurrent processing engine 340.

According to an embodiment, the concurrent processing engine 340 maygenerate a session ID of the packet received from the network driver 320for identifying the packet per session. The concurrent processing engine340 may generate the session ID, based on IP address information (e.g.,sender and receiver IP addresses) and port information (e.g., sender andreceiver ports), for use in identifying the packet session. Theconcurrent processing engine 340 may send to the core managementcontroller 330 the session ID of the received packet and a number of thedriver core A that has delivered the packet to the concurrent processingengine 340.

According to an embodiment, the concurrent processing engine 340 mayreceive location information of the location of the core for takingcharge of the packet session among the cores in the multicore 410 of theelectronic device from the core management controller 330. The locationinformation of the core may be a core number or core clusterinformation. For example, the core for taking charge of the session maybe a core for TCP/IP stack processing, e.g., network processing core Bin FIG. 4.

According to an embodiment, the concurrent processing engine 340 mayactivate the network processing core corresponding to the determinedlocation and send the packet received from the network driver 320 to theTCP/IP stack 350.

According to an embodiment, the TCP/IP stack 350 may perform networklayer (e.g., IP layer) and transport layer (e.g., TCP layer and userdatagram protocol (UDP) layer) processing on the packet. For example,the TCP/IP stack 350 may perform IP and TCP processing on the receivedpacket and send the TCP-processed packet to the user buffer 447 or theapplication core C.

According to an embodiment, the core management controller 330 mayinclude a manager 331 and a database (DB) 332.

The core management controller 330 may monitor the packet processingstatus in the OS domain and the operation status of the applicationbased on the manager 331 and the DB 332 and determine a location of thenetwork (e.g., TCP/IP stack) processing core B and/or application core Cfor processing the packet based on the session ID of the received packetfrom the concurrent processing engine 340 and a core determinationpolicy. For example, the core management controller 330 may determinethe identifier of the network processing core B and/or application coreC or the type of the cluster to which the application core C belongs.

According to an embodiment, the manager 331 of the core managementcontroller 330 may receive a session ID of the received packet from theconcurrent processing engine 340. The manager 331 may monitor theinformation related to the corresponding session ID. For example, themanager 331 may monitor session packet throughput for each application,the location of the driver core A of which the network driver 320 hasdelivered the packet of the corresponding session to the concurrentprocessing engine 340, and the location of the application core Cdelivering the packet of the corresponding session from the TCP/IP stack350 to the application 360. For example, the manager 331 may check thenumber or cluster information of the application core C that deliversthe packet of the corresponding session from an agent (not shown)included in the TCP/IP stack 350 to the application 360.

According to an embodiment, the manager 331 may store the monitoredinformation (e.g., packet processing amount and core location) in the DB332.

According to an embodiment, the manager 331 may determine the locationof the network processing core B (and/or application processing core C)for processing the packet of the corresponding session based on themonitored information, the location of the application core C, thelocation of the driver core A, and the packet processing amount of thecorresponding session.

According to an embodiment, the manager 331 may determine the locationof the network processing core B and/or the application core C. Forexample, the concurrent processing engine 340 may select one of thecores belonging to the high performance cluster and assign the selectedcore as the network processing core B based on the location informationreceived form the manager 331, the location information indicating thehigh performance cluster.

According to an embodiment, the DB 332 may store information on thesession monitored by the manager 331, predefined core determinationpolicy information, session information, core information, andapplication information. For example, the DB 332 may be implemented inthe form of, but is not limited to, a table for convenience ofexplanation.

Table 1 is a table storing core information. The core information mayinclude cluster types corresponding to respective core numbers and coremaximum clock information. The manager 331 may check the coreinformation for the location, i.e., cluster type, of the correspondingcore.

TABLE 1 Core number Cluster type Maximum clock 0 LITTLE 1.7 GHz 1 LITTLE1.7 GHz . . . . . . . . . 8 BIG 2.7 GHz

Table 2 is a table storing session information for each application. Thesession information may include throughputs of sessions identified bythe session IDs, Rx data sizes, driver core numbers or identifiers, Rxdata sizes, application core numbers or identifiers, applicationidentity (ID) information, and threshold processing amount rangeinformation. The processing amount of a session denotes a number ofpackets processed during a predetermined period. For example, if 10megabytes (MB) of packets are processed per second during a session, theprocessing amount of the session may be 10 MB per second (MBps).

According to an embodiment, the session information may include drivercore A number, application core B number, and network processing core Cnumber corresponding to a combination of the application core C numberand threshold processing amount range of the core.

TABLE 2 Appli- Network Appli- Session Driver cation Rx data Processingprocessing cation ID core core size amount core ID 0 0 3  10 Mb  10 Mbps2 1 1 0 5 150 Mb 150 Mbps 7 2 . . . . . . . . . . . . . . . . . . . . .N [0, M] [0, M] Number Number [0, M] K

Table 3 is a table storing operation FLAG values corresponding topredetermined application IDs. The FLAG values may be the informationindicating predetermined applications.

TABLE 3 Application ID FLAG 0 0 1 1 . . . . . . K Number

Table 4 is a table of core determination policies. The manager 331 maydetermine a location of a network processing core B based on thelocation of the driver core A, the location of the application core C,and processing amount information of a session. For example, in the casewhere the driver core A belongs to the low performance type, theapplication core C belongs to the high performance type, and the packetprocessing amount is high, the manager 331 may determine that thenetwork stack processing core B belongs to the high performance type.The manager 331 may also determine the location of the networkprocessing core B such that a core that has a predetermined number or israndomly selected among the cores belonging to the high performance typeperforms network stack processing.

TABLE 4 Core of pre- Driver Application Low medium Heavy determined corecore throughput throughput throughput application LITTLE LITTLE — LITTLEBIG LITTLE LITTLE BIG — BIG BIG BIG LITTLE — BIG BIG BIG BIG — BIG BIGBIG BIGBIG

Hereinafter, a description is made of the host and operations of a coreprocessing packets in the OS domain. Referring to FIG. 4, the multicore410 may include, but is not limited to, core 1 411, core 2 412, core 3413, and core 4 414. The cores included in the multicore 410 may becategorized, according to their performances, into one of a lowperformance cluster or a high performance cluster. For example, core 1411 and core 2 412 may belong to the low performance cluster andcharacterized by less power consumption and low processing capability,However, core 3 413 and core 4 414 may belong to the high performancecluster and characterized by more power consumption and high processingcapability.

The driver core A may deliver packets from the network driver 320 to theconcurrent processing engine 340. For example, the driver core A mayqueue the packet delivered to the network driver 320 in the enginebuffer 442 of the concurrent processing engine 340. The driver core Amay control the concurrent processing engine 340.

According to an embodiment, the concurrent processing engine 340 maydetermine one of the cores of the multicore 410 as the networkprocessing core B based on the core assignment information received fromthe core management controller 330. The concurrent processing engine 340may activate the core identified by the number of the determined networkprocessing core B and queue the packet in the engine buffer 442corresponding to the determined network processing core B.

The network processing core B may process packets in the TCP/IP stack350. The application core C may process TCP-processed packets in a TCPbuffer in the user domain.

According to an embodiment, the packet received via the network driver320 may be sequentially processed by the driver core A, the networkprocessing core B, and the application core C in order. The packet maybe processed by the core identified with a different number in eachlayer. For example, core 0 may be designated as the driver core A andcore 3 may be designated as the network core B, in the packet processingprocedure.

The cores A, B, and C of the respective layers may be assigned buffersfor processing packets. For example, the driver core A may be assignedthe driver buffer 441 for queuing packets and delivering the packets tothe concurrent processing engine 340. The concurrent processing engine340 may be assigned the engine buffer 442 for temporarily queuing thepackets to be delivered to the network processing core B. The networkprocessing core B may be assigned the TCP buffer 443 for TCP/IPprocessing. The TCP buffer 443 may be assigned per session, but it isnot limited thereto. The application core C may be assigned the userbuffer 447 for data processing of an application. Although FIG. 4depicts a single buffer per layer for convenience of explanation, theremay be multiple buffers per layer. Each buffer may be implemented in theform of, but is not limited to, a stack-structured memory or queue. Eachbuffer may be a part of the memory (e.g., memory 130 in FIG. 1) of theelectronic device 201 (e.g., electronic device 101 in FIG. 1).

According to an embodiment, the network driver 320 may send the packetreceived from the MC to the engine buffer 442 of the concurrentprocessing engine 340 under the control of an arbitrary driver core A.

For example, if a packet arrives at the network driver, a core having acertain number, e.g., core 1 411, is activated as the driver core A,which may control the operation of the concurrent processing engine 340and queue the received packet in the engine buffer 442 of the concurrentprocessing engine 340.

The concurrent processing engine 340 may generate a session ID of thepacket and send session ID information and location information of thedriver core A from which the packet has been received to the coremanagement controller 330.

The core management controller 330 may determine a location of theapplication core C for processing the application 360 in the user domainin association with the session ID of the received packets and providethe concurrent processing engine 340 with the location information ofthe application core C. For example, the core management controller 330may determine the location of the network processing core B for TCP/IPstack processing based on the location of the application core C, thelocation of the driver core A, and a session packet processing amount.

The concurrent processing engine 340 may activate the network processingcore B corresponding to the location determined based on the locationinformation received from the core management controller 330. Theconcurrent processing engine 340 may reflect varying pieces of locationinformation of the application core C based on the location informationreceived from the core management controller 330 and assign the networkprocessing core B in order for a core having a capability equal to orhigher than that of the application core C to process the packets.

The network processing core B may perform TCP stack processing on thepackets queued in the TCP buffer 443. For example, if core 3 413 isactivated by the concurrent processing engine 340, the networkprocessing core B indexed by core 3 sends the packets queued in theengine buffer 442 to the TCP buffer 443 and performs TCP/IP stackprocessing on the packets queued in the TCP buffer 443.

The application core C may process the packets TCP/IP-processed by thenetwork processing core B based on the session ID of the packets.

According to an embodiment, the TCP buffer 443 may be assigned to atleast one region. For example, the TCP buffer 443 may be included in anRx queue region 444 for queuing the packets to be delivered to or readby the application, i.e., TCP-processed packets, and a backlog region445 to which the packets on which the TCP/IP stack processing is to beperformed are delivered. The Rx queue region 444 may store the packetsTCP/IP-processed by the network processing core B.

According to an embodiment, the network processing core B may queue thepackets in the backlog region 445 for TCP/IP stack processing while theapplication 360 outputs the packets from the Rx queue region 444 to theuser domain.

According to an embodiment, the application associated with the sessionID of the packets may batch all the packets queued in the backlog region445 while the application core C processes all the TCP-processed packetsqueued in the Rx queue region 444.

According to various embodiments, the proposed electronic device iscapable of optimally batching the packets processed in a lower layer anddelivering the optimally batched packets to a higher layer bydetermining to allow a core having a capability equal to or greater thanthat operating in the higher layer to operate in the low layer, therebyimproving the multicore performance.

FIG. 5 is a diagram illustrating a packet processing operation accordingto an embodiment of the disclosure.

In a receive packet steering (RPS)-based technology of the related art,if packets are received from a network driver, a network processing coreis arbitrarily selected among multiple cores without any priority orderto perform TCP/IP processing. In a receive flow steering (RFS)-basedtechnology, a network processing core having a core number (core N) onwhich an application 590 is running is selected to perform TCP/IPprocessing. According to the technologies of the related art, thenetwork processing core is selected without consideration of aprocessing capacity of the core and a location of the core executing theapplication, which causes a performance difference between theapplication core and the driver core, leading to a failure to take fulladvantage of the multicore processing performance. Furthermore, ifpackets are concentrated in a certain session, this may overload a core,resulting in packet processing performance degradation.

Referring to FIG. 5, the electronic device (e.g., electronic device 101in FIG. 1 and electronic device 201 in FIG. 2) including the multicore(e.g., multicore 210 in FIG. 2 and multicore 410 in FIG. 4) maydetermine a location of an application core based on a session ID of thepackets and a location (e.g., number or cluster type) of a networkprocessing core for TCP/IP stack processing based on a location of adriver core and a packet processing amount of a session. According tovarious embodiments, the network processing core determined inconsideration of the performances of the cores of a lower layer and ahigher layer performs network stack processing on the packets, whichimproves multicore-based batch processing performance.

According to an embodiment, if a packet 510 arrives at the networkdriver, a driver core of core 1 may be activated. The applicationassociated with the packet may process the packets TCP/IPstack-processed by the application core of core N. The driver core ofcore 1 may send the packets to a concurrent processing engine (e.g.,concurrent processing engine 340 in FIGS. 3A and 3B) as denoted byreference number 520. Then, the concurrent processing engine may assigna network processing core for performing TCP/IP stack processing to core2 based on the location information received from a core managementcontroller. The location of the network processing core may bedetermined in consideration of the location (core 2) of the applicationcore, the location (core 1) of the driver core, and a processing amountof the packet session.

If the driver core of core 1 activates the network processing core ofcore 2, the concurrent processing engine may send the packets to the TCPbuffer (e.g., TCP buffer 443 in FIG. 4). The network processing core mayperform TCP/IP stack processing on the packets queued in the TCP buffer.The application may output the packets TCP/IP stack-processed by theapplication core of core N.

According to an embodiment, the location of the application may movefrom core N to core 2 according to the operation status of theelectronic device. For example, the location 590 of the application coreexecuting the application in the user domain may be dynamically changedaccording to the application execution location (e.g., foreground andbackground) and a core load value.

If the location of the application core is changed from the location 590to the location 591, the concurrent processing engine may change thelocation of the network processing core from a core 2 location 550 to acore 3 location 551. The concurrent processing engine may send thepackets at location 531 to the TCP buffer in core 3. The networkprocessing core of core 3 may perform TCP/IP stack processing on thepackets. The application core of core 2 may process the packetsprocessed by the network processing core of core 3.

According to an embodiment, the electronic device including themulticore may determine a network stack processing core in considerationof the location of the application core or the location of the drivercore.

FIG. 6 is a diagram illustrating a packet processing operation of anelectronic device according to an embodiment of the disclosure.

Referring to FIG. 6, the electronic device (e.g., electronic device 101in FIG. 1 and electronic device 201 in FIG. 2) including the multicore(e.g., multicore 210 in FIG. 2 and multicore 410 in FIG. 4) maydetermine the number (or cluster type) of the application core as wellas the network processing core for TCP/IP stack processing to change thelocation of the application core for processing the packets.

For example, the electronic device may determine the location 650 ofcore 3 as the network processing core for TCP/IP stack processing inconsideration of the location of the application core, the location ofthe driver core, and a processing amount of each session. The drivercore may control the concurrent processing engine to queue the packetsin the TCP buffer. The network processing core of core 3 may performTCP/IP stack processing on the packets queued in the TCP buffer (e.g.,TCP buffer 443 in FIG. 4).

For example, the application core, which reads out and processes theTCP/IP stack-processed packets, may move its location from a core Nlocation 690 to a core 2 location 691. In FIG. 6, the applicationoperating in the application core of core N may be an applicationpredetermined by the application core number (e.g., cluster type). Theelectronic device may change the location 690 of the application corewhen the session processing amount of received packets becomes equal toor greater than a predetermined level. For example, if the sessionprocessing amount of the received packets reaches a middle or highlevel, the electronic device may change the location of the applicationcore from core N location 690 to core 2 location 691 by reflecting thelocation of the predetermined core. If the session processing amount ofthe received packets is a low level, the electronic device may maintainthe location 690 of the application core. In the case whether thelocation of the application core is changed from the core N location 690to the core 2 location 691, the application core of core 2 may read outand process the TCP/IP stack-processed packets.

FIG. 7 is a flowchart illustrating a method to determine a core forprocessing packets according to an embodiment of the disclosure.

Referring to FIG. 7, operations 710 to 770 may be performed by theelectronic device (e.g., electronic device 101 in FIG. 1 and electronicdevice 201 in FIG. 2) include the multicore (e.g., multicore 210 in FIG.2 and multicore 410 in FIG. 4).

According to an embodiment, the electronic device 101 may receive atleast one packet via an NIC (e.g., NIC 315 in FIGS. 3A and 3B) atoperation 710.

At operation 720, the electronic device may activate a driver core Awith an arbitrary number X among multiple cores of the multicore basedon the received packet.

According to an embodiment, the core may be activated under the controlof a communication processor. The core may be a core with apredetermined default number or a core that is randomly selected. Thecore may be a core selected among the cores in the sleep mode.

At operation 730, the driver core A with number X in the electronicdevice may queue the received packet in an engine buffer (e.g., enginebuffer 442 in FIG. 4) of a concurrent processing engine (e.g.,concurrent processing engine 340 in FIGS. 3A and 3B, concurrentprocessing engine 540 in FIG. 5, and concurrent processing engine 640 inFIG. 6).

According to an embodiment, the concurrent processing engine maygenerate a session ID of the received packets and send the session ID ofthe packets and the number information of the driver core A that hastransmitted the packets to the concurrent processing engine to a coremanagement controller (e.g., core management controller 230 in FIG. 2and core management controller 330 in FIGS. 3A and 3B). The coremanagement controller may determine a location (e.g., number or clustertype) of the network core B in consideration of the location (e.g.,number X) of the driver core A, the location (e.g., number Y) of theapplication core C associated with the packets, and the packetprocessing amount.

At operation 740, the driver core A of the electronic device may receivelocation information of the network processing core from the coremanagement controller.

At operation 750, the driver core A may activate the network processingcore B corresponding to the location acquired from the locationinformation. The network processing core B may send the packets storedin the concurrent processing engine to the TCP buffer.

According to an embodiment, if the location of the network processingcore is indicative of the cluster type, the driver core A of theelectronic device may activate one of the cores belonging to thecorresponding cluster type.

At operation 760, the network processing core B of the electronic devicemay perform TCP/IP processing on the packets.

At operation 770, the application core C of the electronic device mayprocesses the packets TCP/IP-processed by the network processing core B.The application core C may be a core for operating the applicationassociated with the session ID of the received packets.

According to an embodiment, operations 760 and 770 may either beperformed simultaneously or in parallel. For example, the TCP bufferassigned to the TCP/IP stack may include an Rx buffer for queuing theTCP/IP-processed packets and a backlog buffer for queueing the packetsbefore being processed. The application core C may process the packetsqueued in the Rx buffer and, simultaneously or in parallel, the networkprocessing core B may perform TCP/IP stack processing on the packetsqueued in the backlog buffer.

According to various embodiments, the electronic device (e.g.,electronic device 101 in FIG. 1 and electronic device 201 in FIG. 2) mayinclude a communication device (e.g., communication module 190 in FIG.1), a multicore (e.g., multicore 210 in FIG. 2) comprised of multiplecores operating in at least one of a driver core A layer, a networkprocessing core B layer, and an application core C layer for processingpackets and a memory (e.g., memory 130 in FIG. 1 and memory 240 in FIG.2) storing instructions, executable by at least one of the multiplecores, for checking a location of the driver core delivering packetsreceived by the communication device to an OS domain, a location of theapplication core for processing the packets in a user domain, and aprocessing amount of a session corresponding to the received packets,determining a location of the network processing core among the coresbased on at least one of the locations of the driver core and theapplication core and the processing amount of the session, andperforming, at the located network processing core, network stackprocessing on the packets delivered to the OS domain.

According to an embodiment, the location of the network processing coreis a core number or cluster information of a core type categorizedaccording to a capability difference, the location of the networkprocessing core may be core number or cluster type cluster informationclassified according to a performance difference.

According to an embodiment, the instructions cause one core of themulticore to determine the location of the network processing core byselecting a core number to control network processing core layer.

According to an embodiment, the multiple cores are categorized into oneof a first cluster type and a second cluster type, and the instructionscause the at one of the multicore to determine a cluster type of thenetwork processing core and determine the location of the networkprocessing core by randomly selecting a core number belonging to thedetermined cluster type to determine the location of the networkprocessing core.

According to an embodiment, the instructions cause the core of themulticore to: activate a driver core with an arbitrary core number Xamong the multiple cores, send the packets through the driver core withthe core number X to the operating system domain, acquire, at the drivercore with the core number X, the determined location of the networkprocessing core, send the packets through the driver core with the corenumber X to the network processing core with a core number Z based onthe acquired location of the network processing core, perform, at thenetwork processing core with the core number Z, network stack processingon the received packets, and process, at the application core with anarbitrary core number Y, the packets processed by the network processingcore with the core number Z.

According to an embodiment, the instructions cause the core of themulticore to: process by batching the packets corresponding in amount toa predetermined reference processing amount configured by the networkprocessing core.

According to an embodiment, the electronic device comprising aconcurrent processing engine and a core management controller operatingin the operating system domain, wherein the instructions cause the atconcurrent processing engine to: generate session identity informationof the packets from the driver core, send the session identityinformation and a core number of the driver core that sends the packetsto the concurrent processing engine to the core management controller,acquire the location of the network processing core from the coremanagement controller, and send the packets received from the drivercore to the network processing core at the determined location.

According to an embodiment, the instructions cause the core managementcontroller to: determine a core number of the network processing corebased on at least one of the session identity information of thereceived packets, the core number of the driver core, the core number ofthe application core processing the packets, and packet processingamount information of the session and send the core number of thenetwork processing core to the concurrent processing engine.

According to an embodiment, the instructions cause the at one of themulticore to: determine the location of the application core bymonitoring operations of the application processing the packets based onthe session identity information of the packets and change the locationof the application core processing the packets among the cores based ona condition of changing the location of the application core beingsatisfied, determining, based on a determination that the location ofthe core corresponding to the application associated with the packets isnot designated, the location of the application core according towhether the application is running in foreground or background.According to an embodiment, the instructions cause the at one of themulticore to perform at least one of: for identifying the location ofthe application core, based on a determination that a location of a corefor an application associated with the packets is designated, with thedesignated location of the core, determining, based on a determinationthat the location of the core corresponding to the applicationassociated with the packets is not designated, the location of theapplication core according to whether the application is running inforeground or background, and determining the location of theapplication core through learning related to packet processing of theapplication.

FIG. 8 is a flowchart illustrating a method to determine a core forprocessing packets according to an embodiment of the disclosure.

Referring to FIG. 8, the electronic device (e.g., electronic device 101in FIG. 1 and electronic device 201 in FIG. 2) including a multicore(e.g., multicore 210 in FIG. 2) may receive packets at operation 810 bymeans of an NIC (e.g., NIC 315 in FIGS. 3A and 3B).

At operation 820, the electronic device may activate a driver core Aidentified by number X among multiple cores of the multicore uponreceipt of the packets.

At operation 830, the driver core A identified by number X in theelectronic device may queue the received packets in an engine buffer(e.g., engine buffer 442 in FIG. 4) of a concurrent processing engine(e.g., concurrent processing engine 340 in FIGS. 3A and 3B).

At operation 840, the concurrent processing engine generates a sessionID of the packets and receives number Y of the network processing core Bfrom a core management controller (e.g., core management controller 230in FIG. 2 and core management controller 330 in FIGS. 3A and 3B). Forexample, operation 840 may be performed through operations 910 to 960 ofFIG. 9 for acquiring location information (e.g., number Y) of thenetwork processing core B.

According to an embodiment, the concurrent processing engine may checkfor the session ID of the received packets, send number X of the drivercore A that has delivered the packets to the concurrent processingengine to the core management controller, and receive number Y of thenetwork processing core B from the core management controller.

According to an embodiment, the core management controller may determinethe number of the network processing core B for performing TCP/IP stackprocessing in consideration of the location of the application coreassociated with the session ID of the packets, the location of thedriver core, and the per-session processing amount.

According to an embodiment, the core management controller may send thenumber information of the network processing core B to the concurrentprocessing engine. The concurrent processing engine may assign thenetwork processing core B identified by the corresponding number forprocessing the received packets.

At operation 850, the driver core A may activate the network processingcore B identified by number Y.

At operation 860, the network processing core B identified by number Ymay output the packets from the engine buffer and queue the packets inthe TCP buffer.

At operation 870, the network processing core B identified by number Ymay perform TCP/IP processing on the packets queued in the TCP buffer.

At operation 880, the application core C may process theTCP/IP-processed packets.

Although it is described that the electronic device controls theoperations of FIGS. 9 and 10, it may be understood that the coremanagement controller depicted in FIGS. 3A and 3B or a processorcontrolling the multicore controls the operations.

FIG. 9 is a flowchart illustrating a method for a multicore electronicdevice to determine a core for processing packets according to anembodiment of the disclosure.

Referring to FIG. 9, the electronic device (e.g., electronic device 101in FIG. 1 and electronic device 201 in FIG. 2) including a multicore(e.g., multicore 210 in FIG. 2 and multicore 410 in FIG. 4) maydetermine a location of the network processing core B for performingnetwork stack (e.g. TCP/IP stack) processing on the packets. Although itis described that the electronic device controls operations 910 to 960,it may be understood that a core management controller (e.g., coremanagement controller 230 in FIG. 2 and core management controller 330in FIGS. 3A and 3B) or a processor (e.g., processor 120 in FIG. 1)controlling the multicore may control the operations.

At operation 910, the electronic device may receive a session ID of thepackets from a concurrent processing engine (e.g., concurrent processingengine 340 in FIGS. 3A and 3B, concurrent processing engine 540 in FIG.5, and concurrent processing engine 640 in FIG. 6). At operation 920 theelectronic device may acquire session processing information for eachapplication session. At operation 930, the electronic device may acquirelocation information (e.g., a core number) of a driver core that hassent the packets to the concurrent processing engine. At operation 940,the electronic device may acquire location information (e.g., corenumber or cluster type) of an application core C for processing thepackets associated with the session ID.

At operation 950, the electronic device may determine location Y of anetwork processing core B based on session processing information, corepolicy information, location X of the driver core A, and location Z ofthe application core C. At operation 960, the electronic device may sendthe information on number Y of the network processing core B to theconcurrent processing engine.

FIG. 10 is a flowchart illustrating a method for a multicore electronicdevice to determine a core for processing packets according to anembodiment of the disclosure.

Referring to FIG. 10, the electronic device (e.g., electronic device 101in FIG. 1 and electronic device 201 in FIG. 2) including a multicore(e.g., multicore 210 in FIG. 2 and multicore 410 in FIG. 4) may monitorthe location of the application core processing data in the user domainfor a change and determine a location of a network processing core Bbased on the changed location of the application core.

At operation 1010, the electronic device may detect applicationprocessing packets queued in a TCP buffer in the user domain.

At operation 1020, the electronic device may acquire number “a” of anapplication core C processing application data based on an applicationID.

According to an embodiment, the electronic device may acquire locationinformation (e.g., core number or cluster type) of the application coreC based on the application ID received from an agent included in anetwork processing stack (e.g., TCP/IP stack).

At operation 1030, the electronic device may monitor an applicationoperation status.

At operation 1040, the electronic device may determine a location of theapplication core.

According to an embodiment, the electronic device may check theapplication operation status for a time of a core processing theapplication and a number of packets being processed based on theapplication ID and, if the use of the cores of a predetermined clustertype is greater than an threshold operation value, designate the clustertype of the corresponding core as the location of the main coreprocessing the application.

According to an embodiment, the electronic device may designate thelocation of the application core based on whether the application isrunning in the foreground or the background.

According to an embodiment, the electronic device may predesignate acore location for a specific application or designate the location ofthe application core through machine learning.

At operation 1050, the electronic device may determine a processingamount threshold value of a packet processing amount of the applicationaccording to the location of the application core.

According to an embodiment, the electronic device may change thethreshold value of the packet processing amount of the application basedon the location information of the application core, locationinformation of the driver core delivering the packets to the concurrentprocessing engine, and characteristic information of the application.

According to an embodiment, the electronic device may change thethreshold value of the packet processing amount according to thelocation of the main core processing the application.

According to an embodiment, the electronic device may change thethreshold value of the packet processing amount based on whether theapplication is running in the foreground or the background.

According to an embodiment, the electronic device may change thethreshold value of the packet processing amount based on preconfiguredinformation or, if the location of the application core is designatedthrough learning, the designated location of the core.

At operation 1060, the electronic device may update applicationinformation. At operation 1070, the electronic device may determine atleast one of the network processing core and/or application core byapplying the updated information.

FIG. 11 is a flowchart illustrating a method for a multicore electronicdevice to determine a core for processing packets according to anembodiment of the disclosure.

Referring to FIG. 11, the electronic device (e.g., electronic device 101in FIG. 1 and electronic device 201 in FIG. 2) including a multicore(e.g., multicore 210 in FIG. 2 and multicore 410 in FIG. 4) may check,at operation 1110, the status of the application (or app) processing thereceived packets. At operation 1120, the electronic device may determinewhether the application is running in the foreground. If it isdetermined that the application is running in the foreground, theelectronic device may determine at operation 1130 whether a core map ofthe application running in the foreground exists. If it is determinedthat the application is not running in the foreground, the electronicdevice may determine at operation 1125 whether a core map of theapplication running in the background exists. For example, the core mapof an application may be information indicating the location of apredesignated core based on the application ID.

If it is determined that a core map of the corresponding applicationexists at operations 1130 or 1125, the electronic device may designate acluster type location of an RPS core for TCP/IP stack processingaccording to the application core map at operation 1140. For example,the RPS core may be a network processing core. If it is determined thata core map of the corresponding application does not exist, theprocedure proceeds to operation 1150.

At operation 1145, the electronic device may determine whether theapplication core may need to be updated. According to an embodiment, ifthe location of the core designated in the application core map differsfrom the location of the application core processing data in the userdomain, the electronic device may determine that the application coremap needs to be updated. According to an embodiment, if a periodpredetermined for updating the core map elapses, the electronic devicemay determine that the application core map needs to be updated.

At operation 1150, the electronic device may determine and store thelocation of the application core for processing data in the user domain.The electronic device may determine at operation 1155 whether the numberof times of the same application core location determination resultreaches N and, if so, the core may update the core map of thecorresponding application at operation 1160. At operation 1170, theelectronic device may configure the RPS core for TCP/IP stack processingin consideration of the location information of the application coredetermined based on the application core location determination result.

FIG. 12 is a flowchart illustrating a method for a multicore electronicdevice to determine a core for processing packets according to anembodiment of the disclosure.

Referring to FIG. 12, the electronic device (e.g., electronic device 101in FIG. 1 and electronic device 201 in FIG. 2) including a multicore(e.g., multicore 210 in FIG. 2 and multicore 410 in FIG. 4) may activatea driver core A with number X among multiple cores of the multicore atoperation 1210. At operation 1220, the driver core A with number X inthe electronic device may send the packets to a concurrent processingengine. At operation 1230, the driver core A of the electronic devicemay acquire the location of a network processing core B determined basedon the location X of the driver core A and location Y of an applicationcore C.

At operation 1240, the network processing core B corresponding to thelocation acquired by the electronic device may perform TCP/IP processingon the received packets.

At operation 1250, the electronic device may determine whether thelocation of the application core C is changed. For example, theelectronic device may determine whether the location of the applicationcore C is changed by performing operations described with reference toFIG. 10 or 11.

If it is determined that the location of the application core C ischanged at operation 1250, the application core C′ with a changed corenumber W may process the packets TCP/IP-processed by the networkprocessing core B at operation 1270. If it is determined at operation1250 that the location of the application core C is not changed, theapplication core C with the core number Y may process the packetsTCP/IP-processed by the network processing core B at operation 1260.

According to various embodiments, the electronic device (e.g.,electronic device 101 in FIG. 1 and electronic device 201 in FIG. 2) mayinclude a communication device (e.g., communication module 190 in FIG.1), a multicore (e.g., multicore 210 in FIG. 2) comprised of multiplecores operating in at least one of a driver core A layer, a networkprocessing core B layer, and an application core C layer, a memory(e.g., memory 130 in FIG. 1 and memory 240 in FIG. 2) and a processor(e.g., processor 120 in FIG. 1); the processor may control to check alocation of the driver core, as one of multiple cores of the multicore,for sending, when at least one packet is received via the communicationdevice, the packet to the OS domain, a location of the application coreprocessing the packet in the user domain, and a processing amount of asession corresponding to the received packet, determine a location ofthe network processing core among the cores based on at least one of thelocation of the driver core, the location of the application core, andthe processing amount of the session, and control the network processingcore at the determined location among the multiple cores to performnetwork stack processing on the packet.

According to an embodiment, the processor is configured to determine thelocation of the network processing core by selecting a core number tocontrol a network processing core layer.

According to an embodiment, the multiple cores are categorized into oneof a first cluster type and a second cluster type, and the processor isconfigured to control to determine a cluster type of the networkprocessing core and determine the location of the network processingcore by selecting a core number belonging to the determined cluster typeto determine the location of the network processing core.

According to an embodiment, the processor is configured to control toactivate a driver core with an arbitrary core number X among themultiple cores, send the packets through the driver core with the corenumber X to the operating system domain, acquire, at the driver corewith the core number X, the determined location of the networkprocessing core, send the packets through the driver core with the corenumber X to the network processing core with a core number Z based onthe acquired location of the network processing core, perform, at thenetwork processing core with the core number Z, network stack processingon the received packets, and process, at the application core with anarbitrary core number Y, the packets processed by the network processingcore with the core number Z.

According to an embodiment, the processor is configured to control toprocess by batching the packets corresponding in amount to apredetermined reference processing amount configured by the networkprocessing core in the operating system domain.

According to an embodiment, the electronic device comprising aconcurrent processing engine operating in the operating system domainand configured to generate session identity information of the packetsfrom the driver core, send the session identity information and a corenumber of the driver core that sends the packets to the concurrentprocessing engine to the processor, acquire the location of the networkprocessing core from the processor, and send the packets to the networkprocessing core of the determined location.

According to an embodiment, the processor is configured to determine acore number of the network processing core based on at least one of thesession identity information of the received packets, the core number ofthe driver core, the core number of the application core processing thepackets, and packet processing amount information of the session andsend the core number of the network processing core to the concurrentprocessing engine, the concurrent processing engine being configured tosend the packets to the network processing core corresponding to thereceived core number.

According to an embodiment, the processor is configured to control todetermine a location of the application core by monitoring operations ofthe application processing the packets based on the session identityinformation of the packets and change the location of the applicationcore processing the packets among the cores based on a condition ofchanging the location of the application core being satisfied.

According to an embodiment, the processor is configured to control toidentify the location of the application core, based on a determinationthat a location of a core for an application associated with the packetsis designated, with the designated location of the core, determine,based on a determination that the location of the core corresponding tothe application associated with the packets is not designated, thelocation of the application core according to whether the application isrunning in the foreground or the background, or determine the locationof the application core through learning related to packet processing ofthe application.

FIGS. 13A, 13B, and 13C are graphs illustrating effects according tovarious embodiments of the disclosure.

Referring to FIG. 13A, a graph illustrates the electric currentconsumption of a technology of the related art and the proposedtechnology for processing the same number of packets during a session ina comparative manner. Reference number 1310 denotes the consumedelectric current amount of the technology of the related art forprocessing the packets, and reference number 1320 denotes the consumedelectric current amount of the proposed technology in which the coreselected according to one of various disclosed embodiments processes thepackets. For example, unlike that technology of the related art thatselects a big type core for network stack processing for the case wherethe packet processing amount of the session is equal to greater than athreshold value, the proposed technology may determine a core fornetwork stack processing based on the locations of the application coreand the driver core even when the packet processing amount of thesession is equal to or greater than the threshold value. In the case ofusing the proposed technology, it may be possible to maximize the batchprocessing effectiveness by determining the core for performing thenetwork stack processing on the received packets in consideration of theprocessing amount of the session as well as the location information ofthe application core and the driver core. Referring to FIG. 13A, theproposed technology improves the electric current consumption efficiencyby 11% compared with the technology of the related art. FIG. 13B is agraph showing the throughputs of the technologies of the related art andthe proposed technology during a session in a comparative manner.Referring to FIG. 13B, reference number 1330 denotes the packetprocessing amount of the RPS technology of the related art, referencenumber 1340 denotes the packet processing amount of the related art, andreference number 1350 denotes the packet processing amount of theproposed technology in which the packets are processed by a coredetermined in consideration of the location of the application core aswell as the core for performing network stack processing. For example,in the case of randomly selecting the core for performing network stackprocessing, it may be possible for a relatively low performance core toperform TCP/IP processing, leading to inefficiency of batch processingon the packets delivered from the driver core. The proposed technologyis capable of processing packets efficiently by determining the core forprocessing the batch-processed packets in consideration of the packetprocessing amount of a session and locations of the application core andthe driver core. Referring to FIG. 13B, the proposed technology improvesthe packet processing amount by 6˜67% compared with the related art, byselecting the layer cores in a way of maximizing the batch processingthroughput. FIG. 13C is a graph shown the electric current consumptionof the related art and the proposed technology for processing the samenumber of packets during two sessions in a comparative manner. Referencenumber 1360 denotes the consumed electric current amount of the relatedart for processing the packets, and reference number 1370 denotes theconsumed electric current amount of the proposed technology in which thecore selected according to one of various disclosed embodimentsprocesses the packets. In the case of using the proposed technology, itmay be possible to maximize the batch processing effectiveness bydetermining the location of the core for processing the packets persession, unlike the related art. Referring to FIG. 13C, the proposedtechnology improves the electric current consumption efficiency by 6%compared with the related art.

While the disclosure has been shown and described with reference tovarious embodiments thereof, it will be understood by those skilled inthe art that various changes in form and details may be made thereinwithout departing from the spirit and scope of the disclosure as definedby the appended claims and their equivalents.

What is claimed is:
 1. An electronic device including a multicorecomprising: a communication circuit; a multicore including a pluralityof cores, each core being configured to process packets in a driver corelayer, a network processing core layer, and an application core layer;and a memory, wherein the memory configured to store executionsinstructions for causing a first core of the plurality of cores to: whenthe packets are received by the communication circuit, identify alocation of a driver core for delivering the packets to an operatingsystem domain, a location of an application core for processing thepackets in a user domain, and a processing amount of a sessioncorresponding to the packets, determine a location of a networkprocessing core for processing the packets based on at least one of thelocation of the driver core, the location of the application core, andthe processing amount of the session, and control the network processingcore to perform network stack processing on the packets delivered to theoperating system domain.
 2. The electronic device of claim 1, whereinthe location of the network processing core comprises a core number orcluster information of a core type categorized according to a capabilitydifference.
 3. The electronic device of claim 1, wherein theinstructions further cause the first core to: determine the location ofthe network processing core by selecting a core number to control thenetwork processing core layer.
 4. The electronic device of claim 1,wherein the plurality of cores are categorized into one of a firstcluster type and a second cluster type, and wherein the instructionsfurther cause the first core to: determine a cluster type of the networkprocessing core, and randomly select a core number belonging to thecluster type to determine the location of the network processing core.5. The electronic device of claim 1, wherein the instructions furthercause the first core to: activate a second driver core among theplurality of cores, send the packets to the operating system domainthrough the second driver core, acquire, at the second driver core, thelocation of the network processing core, send the packets to a secondnetwork processing core through the second driver core based on thelocation of the network processing core, perform, at the second networkprocessing core, network stack processing on the packets, and after thepackets are processed by the second network processing core, process,process the packets at a second application core.
 6. The electronicdevice of claim 5, wherein the instructions cause the first core to:batch and process an amount of the packets corresponding to apredetermined reference processing amount that is configured by thenetwork processing core.
 7. The electronic device of claim 1, furthercomprising: a concurrent processing engine and a core managementcontroller operating in the operating system domain, wherein theinstructions cause the concurrent processing engine to: generate sessionidentity information of the packets from the driver core, send thesession identity information and a core number of the driver core to thecore management controller, acquire the location of the networkprocessing core from the core management controller, and send thepackets received from the driver core to the network processing core atthe acquired location.
 8. The electronic device of claim 7, wherein theinstructions further cause the core management controller to: determinea core number of the network processing core based on at least one ofthe session identity information, the core number of the driver core,the core number of the application core processing the packets, andpacket processing amount information of the session, and send the corenumber of the network processing core to the concurrent processingengine.
 9. The electronic device of claim 7, wherein the instructionsfurther cause the first core to: determine the location of theapplication core based on monitoring operations of an application thatis processing the packets and the session identity information of thepackets; change the location of the application core based on acondition being satisfied, and when the location of the corecorresponding to the application is not designated, determine thelocation of the application core the application that is running in aforeground or a background.
 10. The electronic device of claim 9,wherein the instructions further cause the first core to perform atleast one of: identify the location of the application core, based on adetermination that a location of a core for an application associatedwith the packets is designated, with the designated location of thecore, in case that the location of the core corresponding to theapplication is not designated, determine the location of the applicationcore according to whether the application is running in the foregroundor the background, and determine the location of the application corethrough a learning process that is related to packet processing of theapplication.
 11. An electronic device comprising: a communicationcircuit; a multicore comprising a plurality of cores, each core beingconfigured to process packets in a driver core layer, a networkprocessing core layer, and an application core layer; a memory; and aprocessor configured to: when the packets are received by thecommunication circuit, control to identify a location of a driver corefor delivering, the packets, from one of multiple cores, to an operatingsystem domain, a location of an application core for processing thepackets in a user domain, and a processing amount of a sessioncorresponding to the packets, determine a location of a networkprocessing core for processing the packets among the plurality of coresbased on at least one of the location of the driver core, the locationof the application core, and the processing amount of the session, andcontrol to perform network stack processing on the packets using thenetwork processing core.
 12. The electronic device of claim 11, whereinthe processor is further configured to determine the location of thenetwork processing core by selecting a core number to control thenetwork processing core layer.
 13. The electronic device of claim 11,wherein the multiple cores comprise one of a first cluster type and asecond cluster type, and wherein the processor is further configured to:control to determine a cluster type of the network processing core, anddetermine the location of the network processing core by selecting acore number belonging to the determined cluster type to determine thelocation of the network processing core.
 14. The electronic device ofclaim 11, wherein the processor is further configured to: control toactivate a second driver core among the plurality of cores, send thepackets to the operating system domain through the second driver core,acquire, at the second driver core, the location of the networkprocessing core, send the packets through the second driver core to asecond network processing core based on the location of the networkprocessing core, perform, at the second network processing core, networkstack processing on the packets, and process, at a second applicationcore, the packets processed by the second network processing core. 15.The electronic device of claim 11, wherein the processor is furtherconfigured to control to process by batching the packets correspondingto a predetermined reference processing amount that is configured by thenetwork processing core in the operating system domain.
 16. Theelectronic device of claim 11, further comprising a concurrentprocessing engine operating in the operating system domain andconfigured to: generate session identity information of the packets fromthe driver core, send the session identity information and a core numberof the driver core that sends the packets to the concurrent processingengine to the processor, acquire the location of the network processingcore from the processor, and send the packets to the network processingcore of the acquired location.
 17. The electronic device of claim 16,wherein the processor is further configured to: determine a core numberof the network processing core based on at least one of the sessionidentity information of the packets, the core number of the driver core,the core number of the application core processing the packets, andpacket processing amount information of the session, and send the corenumber of the network processing core to the concurrent processingengine, the concurrent processing engine being configured to send thepackets to the network processing core corresponding to the receivedcore number.
 18. The electronic device of claim 17, wherein theprocessor is further configured to: control to determine a location ofthe application core by monitoring operations of the applicationprocessing the packets based on the session identity information of thepackets, and change the location of the application core processing thepackets among the cores based on a condition of changing the location ofthe application core being satisfied.
 19. The electronic device of claim18, wherein the processor is further configured to: control to identifythe location of the application core based on a determination that alocation of a core designated for executing an application associatedwith the packets, determine, based on a determination that the locationof the core corresponding to the application associated with the packetsis not designated, the location of the application core according towhether the application is running in a foreground or a background, ordetermine the location of the application core through learning relatedto packet processing of the application.
 20. The electronic device ofclaim 19, wherein the processor is further configured to determine thelocation of the application core based on a processing requirement ofthe application.